function formatCombobox(obj,uri){   
 	obj.combobox({
		url:uri,
		valueField:"codeId",
        textField:"codeName", 
        method:"get",
        editable:false,
        panelHeight:"auto"
    });
}

//判断字符串是否符合日期格式
function isDate(dateString){
	   if(dateString=="")
	    	return true;
	    var r=dateString.match(/^(\d{1,4})(\-)(\d{1,2})\2(\d{1,2})$/); 
	    if(r==null){
	      return false;
	    }
	    var d=new Date(r[1],r[3]-1,r[4]);   
	    var num = (d.getFullYear()==r[1]&&(d.getMonth()+1)==r[3]&&d.getDate()==r[4]);
	    return (num!=0);
}  

//判断字符串是否有可能符合日期格式
function isMaybeDate(dateString){
	   if(dateString=="")
	    	return true;
	    var r=dateString.match(/^(\d{1,4})(((\-)(\d{1,2})?)?)(((\-)(\d{1,2})?)?)$/); 
	    if(r==null){
	      return false;
	    }
	    return true;
	    
}  